package StudyCode.summary.mycollection;

import java.util.ArrayList;
import java.util.ListIterator;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class AddOrIInsertAnElementToArrayListUsingListIterator {
	public static void main(String[] args) {
		ArrayList aList = new ArrayList();

		aList.add("1");
		aList.add("2");
		aList.add("3");
		aList.add("4");
		aList.add("5");

		ListIterator listIterator = aList.listIterator();

		listIterator.next();

		System.out.println("ListIterator 添加元素前：" + aList);
		listIterator.add("Added Element");
		System.out.println("ListIterator 添加元素后：" + aList);
	}
}
